<template>
  <van-cell :title="artical.title" class="artical-cell">
    <div slot="label" class="artical-label">
      <div class="img-box" v-if="artical.cover.type === 3">
        <van-image
          v-for="(item, index) in artical.cover.images"
          :key="index"
          class="label-img"
          fit="contain"
          :src="artical.cover.images[index]"
        />
      </div>
      <span>{{ artical.aut_name }}</span>
      <span class="common-num">评论 {{ artical.comm_count }}</span>
      <span>{{ artical.pubdate | formdate }}</span>
    </div>
    <van-image
      v-if="artical.cover.type === 1"
      class="right-img"
      fit="contain"
      :src="artical.cover.images[0]"
    />
  </van-cell>
</template>

<script>
export default {
  props: {
    artical: {
      type: Object,
      required: true
    }
  },
  data() {
    return {}
  },

  created() {},

  methods: {}
}
</script>

<style scoped lang='less'>
.artical-cell {
  .artical-label {
    .common-num {
      margin: 0 20px;
    }
    .img-box {
      display: flex;
      margin-bottom: 10px;
      .label-img {
        width: 232px;
        height: 146px;
      }
    }
  }
  .right-img {
    width: 232px;
    height: 146px;
  }
}
</style>
